// 
//  prefsui.js
//  firefox
//  
//  Created by Zak on 2008-06-26.
//  Copyright 2008 Ant.com. All rights reserved.
// 

top.AntPrefsUi = {
    doc: null,
    
    /**
     * On options.xul Load
     * @param param1    Description
     */
    init: function (doc)
    {
        this.doc = doc;
        if (AntPrefs.isExpertMode())
            $('antBarPrefsOpenSitesList').setAttribute('disabled', false);
        if (AntLib.getOsName() == "Darwin")
            $('antBarPrefsOkButton').setAttribute('hidden', false);
        
    },
	
	/**
	 * Enable/Disable the Sites List Button
	 */
	onExpertModeCheckbox: function (event)
	{
	    var checkbox = event.target;
	    
	    $('antBarPrefsOpenSitesList').setAttribute('disabled', !checkbox.checked);
	},
	
	/**
	 * Open the list of sites currently enabled
	 */
	openSitesList: function ()
	{
	    window.openDialog('chrome://antbar/content/xul/options_siteslist.xul', "Site List", "modal");
	}
}
